import java.util.Random;

/**
 * @author xiaoZhao
 * @date 2022/7/14
 * @describe
 */
public class TestSingle {
    private static Random random;

    private static Random getRandom() {
        if (random == null){
            random = new Random();
        }
        return random;
    }

    public static void main(String[] args) {
        Random random1 = getRandom();
        Random random2 = getRandom();
        System.out.println(random1.equals(random2));
    }
}
